<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>员工详情</title>

</head>
<body>
	<form id="f1" th:action="@{/emp}" th:object="${emp}" method="post">
		<h1 th:if="${emp.id == null}">新增员工</h1>
		<div th:if="${emp.id != null}">
			<h1>修改员工222</h1>
			<input type="hidden" th:field="*{id}">
			<input type="hidden" name="_method" value="PUT">
		</div>
		<p>
			姓名：<input type="text"  th:field="*{name}">
		</p>
		<p>
			性别：
			<span th:each="sex:${sexs}">
			<input type="radio" th:field="*{sex}" 
			    th:value="${sex.key}" 
			   >
			<span th:text="${sex.value}">男</span>
			</span>
		</p>
		<p>
			工资：<input type="text" th:field="*{sal}">
		</p>
		<p>
			职位：<input type="text" th:field="*{jobDesc}">
		</p>
		<p>
			<button>保存</button>
		</p>

	</form>
</body>
</html>